
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>e网批发管理后台</title>
    <?php include("common/conn.php"); if($_SESSION['userid']==""){echo "<script>window.location.href='login.php';</script>";} 

    if($_GET['action']=="ok")
    {    
        $date=date("Y-m-d h:i:s");
        $name=trim($_POST[name]);
        $srat=mysql_query("INSERT INTO xitong(notice) VALUES ('$name')");

        echo "<script>window.location.href='notice.php';</script>";
    }

    if($_GET['id']!=""){
        $rert30=mysql_query("select * from xitong where id='".$_GET['id']."'");
        $sdg30=mysql_fetch_array($rert30);
    }


    if($_GET['ch']=="ok")
    {    
        $name=trim($_POST[name]);
        $srat1=mysql_query("update xitong set notice='".$name."' where id='".$_REQUEST['id']."'");

        echo "<script>window.location.href='notice.php';</script>";
    }


    ?>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <link href="css/styles.css" rel="stylesheet" type="text/css" />

    <link rel="stylesheet" href="write/themes/default/default.css" />
    <script charset="utf-8" src="write/kindeditor-min.js"></script>
    <script charset="utf-8" src="write/lang/zh_CN.js"></script>
    <script>
        var editor;
        KindEditor.ready(function(K) {
            editor = K.create('textarea[class="content"]', {
                allowFileManager : true
            });
            K('input[name=getHtml]').click(function(e) {
                alert(editor.html());
            });
            K('input[name=isEmpty]').click(function(e) {
                alert(editor.isEmpty());
            });
            K('input[name=getText]').click(function(e) {
                alert(editor.text());
            });
            K('input[name=selectedHtml]').click(function(e) {
                alert(editor.selectedHtml());
            });
            K('input[name=setHtml]').click(function(e) {
                editor.html('<h3>Hello KindEditor</h3>');
            });
            K('input[name=setText]').click(function(e) {
                editor.text('<h3>Hello KindEditor</h3>');
            });
            K('input[name=insertHtml]').click(function(e) {
                editor.insertHtml('<strong>插入HTML</strong>');
            });
            K('input[name=appendHtml]').click(function(e) {
                editor.appendHtml('<strong>添加HTML</strong>');
            });
            K('input[name=clear]').click(function(e) {
                editor.html('');
            });
        });


    </script>
</head>

<body>

    <!--header-->
    <?php include("common/header.php");?>
    <!--header end-->

    <div id="sub_nav">

        <div id="subnav_wrap" class="container_12">
            <div id="subnav" class=" grid_12">

                <ul>
                  <li><a href="xitong.php">热门搜索</a></li>
                  <li><a href="notice.php" class="sub_nav_active" >结算须知</a></li>
                  <li><a href="xieyi.php">用户协议</a></li>
                  <li><a href="service.php">服务中心信息</a></li>
                  <li><a href="freightRisk.php">海淘运费险</a></li>
                  <li><a href="fanquan.php">平台返券</a></li>
                  <li><a href="erweima.php">二维码</a></li>
                </ul>

            </div>

        </div>


    </div>

    <div class="container_12">
        <form action="?<?php if($_GET['id']!=""){echo "ch=ok";}else{echo "action=ok";} ?>" method="post">
            <h2>添加结算须知</h2>  	
            <table width="100%" border="0" cellpadding="0" cellspacing="0">



                <tr>


                    <tr>
                        <th width="20%" scope="col">结算须知</th>
                        <th width="80%" scope="col">
                            <textarea name="name" class="content" style="height: 500px;">
                                <?php echo $sdg30[notice];?>
                            </textarea>
                        </th>
                    </tr>

                    <tr>
                        <th width="20%" scope="col"></th>
                        <th width="80%" scope="col"><input name="id" type="hidden" value="<?php echo $_GET[id];?>" /><input name="" type="submit" value="提交" /></th>
                    </tr>

                </tr>


            </table>
        </form>
    </div>
</form>
</body>
</html>
